package com.bosssoft.gateway.authentication.service;

import com.bosssoft.gateway.authentication.pojo.dto.UserDTO;
import com.bosssoft.gateway.authentication.pojo.query.LoginQuery;
import com.bosssoft.gateway.authentication.service.factory.UserFallbackFactory;
import common.data.commonresponse.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @interfaceName: LoginClient
 * @description: 调用远程认证（login）服务的客户端
 * @author: lanyukai
 * @date: 2024/6/20 16:04
 * @since 1.0
 **/
@FeignClient(name = "user-permission-center-serve",
        fallbackFactory = UserFallbackFactory.class)
public interface LoginClient {
    @GetMapping("/api/v1/permission/auth")
    CommonResponse<UserDTO> login(@SpringQueryMap LoginQuery loginQuery);
}
